{% extends 'demo/base.html' %}
{% load static %}
{% load common_extras %}
{% block header %}
    {% include 'demo/header.html' %}
{% endblock %}
{% block title %}
    {{ article.title }}
{% endblock %}
{% block link %}
    <link rel="stylesheet" href="{% static "/css/demo/article_detail.css" %}">
{% endblock %}
{% block main %}
    <div class="content">
        <div class="left_box">用户信息</div>
        <div class="right_box">
            <div class="info">
                <h1>{{ article.title }}</h1>
                <div class="tags">
                    <div>
                        <span>作者：{{ article.user.username }}</span>
                        <span>发布时间：{{ article.create_time|time_since }}</span>
                    </div>
                    <div>
                        <span>分类专栏：</span>
                        <span class="tag">
{#                    分类和文章标签#}
                    {{ article.classes }}
                </span>
                        {% if labels %}
                            <span>文章标签：</span>
                            {% for label in labels %}
                                <span class="tag">{{ label.name }}</span>
                            {% endfor %}

                        {% endif %}
                    </div>
                </div>
            </div>
            <div class="article">
                {{ article.content }}
            </div>
        </div>
    </div>
{% endblock %}